home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * qmPrime.h
- *
- * By: John A. Schlack
- * Dates: October 1994
- *
- * Description:
- *
- * This module contains the definition for a structure used in developing
- * the irredundant form. This data will initially be developed when
- * passing all prime implicants to the reducing functions (which retain
- * this data format until the program completes).
- *
- * Release Notes:
- *
- * 1.10 10/28/94 Created to store program-wide macros, structures,
- * and prototypes.
- *
- ****************************************************************************/
-
-
- #ifndef QMPRIME_H
- #define QMPRIME_H
-
-
- /* --------------------------------------------------------------------------------------------- */
-
-
- #define DEBUG 0
-
- #define MAX_VARS 8
- #define MAX_COMBOS (1L << (MAX_VARS - 1))
-
- #ifndef MAIN_C
- #include <stdio.h>
- extern FILE * fp;
- #endif
-
-
- /* --------------------------------------------------------------------------------------------- */
-
-
- /* Structures for Deriving Irredundant Form */
-
- typedef struct irElement
- {
- unsigned char * decimal;
- unsigned char * difference;
- short level; // list level of prime implicant (determines number of entries in "decimal"
- short uniqueCount; // number of unique decimal functions this prime specifies
- short amtInOutput; // number of decimal functions in current output list
- char inOutput; // prime implicant is used in output
- } irElement;
-
-
- typedef struct irredundant
- {
- irElement * irArray; // array of prime implicnats
- short len; // number of prime implicants
- } irredundant;
-
-
- typedef struct decimalArray
- {
- short * array;
- short len;
- } decimalArray;
-
-
- /* --------------------------------------------------------------------------------------------- */
-
-
- /* PROTOTYPES */
-
- void QuineMcClusky( decimalArray * output, decimalArray * dontCare, short actualVars );
- void lowMemory( void );
- void paramError( char * funcName, short param );
- void blockMove( char * dst, char * src, size_t len );
- void printNumbers( FILE * fout, unsigned char * numStr, short len );
- void printEntry( unsigned char * decimal, unsigned char * difference, short level, short vars,
- short * minLevel );
- irredundant * doDecimal( short * decFunction, short decCount, short actualVars );
- short irredundantForm( irredundant * ir, short * function, short funcLen, short actualVars );
-
-
- /* --------------------------------------------------------------------------------------------- */
-
-
- #endif
-